package com.example;

import org.greenrobot.greendao.generator.DaoGenerator;
import org.greenrobot.greendao.generator.Entity;
import org.greenrobot.greendao.generator.Schema;

public class DaoGeneratoe {
    public static void main(String[] args) throws Exception {
        Schema schema = new Schema(1, "com.chinawlx.wlxteacher");
        wlx_user(schema);
        wlx_auth(schema);
        wlx_config(schema);
        wlx_file(schema);
        wlx_grade(schema);
        wlx_grade_notice(schema);
        wlx_grade_timeline(schema);
        wlx_homework(schema);
        wlx_homework_comment(schema);
        wlx_homework_statistics(schema);
        wlx_message(schema);
        wlx_org_classroom(schema);
        wlx_org_space(schema);
        wlx_schedule(schema);
        wlx_schedule_addition(schema);
        wlx_schedule_change(schema);
        wlx_statistics_student_class(schema);
        wlx_statistics_teacher_schedule_day(schema);
        wlx_statistics_teacher_schedule_month(schema);
        wlx_student(schema);
        wlx_student_level(schema);
        wlx_student_medal(schema);
        wlx_student_order_detail(schema);
        wlx_student_study(schema);
        wlx_user_friend(schema);
        wlx_schedule_score(schema);
        new DaoGenerator().generateAll(schema,
                "/Users/wlx/Desktop/chinawlx-android-teacher/WLXTeacher/app" +
                        "/src/main" +
                        "/java-gen/");
    }


    /**
     * 登陆接口的表
     *
     * @param schema
     */
    private static void wlx_user(Schema schema) {
        Entity wlx_user = schema.addEntity("wlx_user");
        wlx_user.addStringProperty("user_id").primaryKey().unique().notNull();
        wlx_user.addStringProperty("mobile").notNull();
        wlx_user.addStringProperty("nickname");
        wlx_user.addStringProperty("realname");
        wlx_user.addLongProperty("birthday");
        wlx_user.addStringProperty("avatar_url");
        wlx_user.addStringProperty("qq");
        wlx_user.addIntProperty("level");
        wlx_user.addIntProperty("score");
        wlx_user.addStringProperty("sex_code");
        wlx_user.addStringProperty("user_type_code");
        wlx_user.addLongProperty("last_modified_date");
    }

    private static void wlx_auth(Schema schema) {
        Entity wlx_auth = schema.addEntity("wlx_auth");
        wlx_auth.addStringProperty("user_id").primaryKey().unique().notNull();
        wlx_auth.addStringProperty("cookie");
        wlx_auth.addIntProperty("version");
        wlx_auth.addIntProperty("is_active");
        wlx_auth.addLongProperty("last_modified_date");

    }

    private static void wlx_config(Schema schema) {
        Entity wlx_config = schema.addEntity("wlx_config");
        wlx_config.addStringProperty("key").notNull();
        wlx_config.addStringProperty("value").notNull();
        wlx_config.addIntProperty("version");
        wlx_config.addLongProperty("last_modified_date");
    }

    private static void wlx_file(Schema schema) {
        Entity wlx_file = schema.addEntity("wlx_file");
        wlx_file.addStringProperty("resource_id").primaryKey();
        wlx_file.addStringProperty("resource_code");
        wlx_file.addIntProperty("duration");
        wlx_file.addIntProperty("size");

        wlx_file.addStringProperty("data");

        wlx_file.addStringProperty("status_code");
        wlx_file.addStringProperty("extend_info");
        wlx_file.addLongProperty("creation_date");
    }

    private static void wlx_grade(Schema schema) {
        Entity wlx_grade = schema.addEntity("wlx_grade");
        wlx_grade.addStringProperty("grade_id").primaryKey();
        wlx_grade.addIntProperty("teacher_user_id");
        wlx_grade.addIntProperty("org_user_id");
        wlx_grade.addIntProperty("space_id");
        wlx_grade.addIntProperty("classroom_id");
        wlx_grade.addStringProperty("title");
        wlx_grade.addStringProperty("summary");
        wlx_grade.addIntProperty("min_student_count");
        wlx_grade.addIntProperty("max_student_count");
        wlx_grade.addIntProperty("student_count");
        wlx_grade.addIntProperty("class_count");
        wlx_grade.addLongProperty("opening_date");
        wlx_grade.addLongProperty("closing_date");
        wlx_grade.addLongProperty("starting_date");
        wlx_grade.addStringProperty("class_duration_code");
        wlx_grade.addStringProperty("class_type_code");
        wlx_grade.addStringProperty("class_type_name");
        wlx_grade.addStringProperty("grade_type_code");
        wlx_grade.addStringProperty("grade_type_name");
        wlx_grade.addLongProperty("last_modified_date");
    }


    private static void wlx_grade_notice(Schema schema) {
        Entity wlx_grade_notice = schema.addEntity("wlx_grade_notice");
        wlx_grade_notice.addStringProperty("grade_notice_id").primaryKey().notNull();
        wlx_grade_notice.addIntProperty("grade_id");
        wlx_grade_notice.addIntProperty("teacher_user_id");
        wlx_grade_notice.addStringProperty("family_user_ids");
        wlx_grade_notice.addIntProperty("resource_id");
        wlx_grade_notice.addStringProperty("content");
        wlx_grade_notice.addStringProperty("type_code");
        wlx_grade_notice.addStringProperty("status_code");
        wlx_grade_notice.addStringProperty("extend_info");
        wlx_grade_notice.addLongProperty("last_modified_date");
        wlx_grade_notice.addLongProperty("creation_date");
    }

    private static void wlx_grade_timeline(Schema schema) {
        Entity wlx_grade_timeline = schema.addEntity("wlx_grade_timeline");
        wlx_grade_timeline.addStringProperty("grade_timeline_id").primaryKey().notNull();
        wlx_grade_timeline.addIntProperty("student_id");
        wlx_grade_timeline.addIntProperty("teacher_user_id");
        wlx_grade_timeline.addIntProperty("grade_id");
        wlx_grade_timeline.addIntProperty("resource_id");
        wlx_grade_timeline.addStringProperty("content");
        wlx_grade_timeline.addStringProperty("type_code");
        wlx_grade_timeline.addStringProperty("extend_info");
        wlx_grade_timeline.addLongProperty("last_modified_date");
        wlx_grade_timeline.addLongProperty("creation_date");
    }

    private static void wlx_homework(Schema schema) {
        Entity wlx_homework = schema.addEntity("wlx_homework");
        wlx_homework.addStringProperty("homework_id").primaryKey().notNull();
        wlx_homework.addIntProperty("teacher_user_id");
        wlx_homework.addIntProperty("family_user_id");
        wlx_homework.addIntProperty("student_id");
        wlx_homework.addIntProperty("grade_id");
        wlx_homework.addIntProperty("schedule_id");
        wlx_homework.addStringProperty("content");
        wlx_homework.addStringProperty("homework_content_code");
        wlx_homework.addStringProperty("status_code");
        wlx_homework.addIntProperty("is_teacher_comment");
        wlx_homework.addIntProperty("is_family_reply");
        wlx_homework.addIntProperty("is_replied");
        wlx_homework.addStringProperty("extend_info");
        wlx_homework.addLongProperty("last_modified_date");
        wlx_homework.addLongProperty("creation_date");
    }

    private static void wlx_homework_comment(Schema schema) {
        Entity wlx_homework_comment = schema.addEntity("wlx_homework_comment");
        wlx_homework_comment.addStringProperty("homework_comment_id").primaryKey();
        wlx_homework_comment.addIntProperty("homework_id").notNull();
        wlx_homework_comment.addIntProperty("user_id").notNull();

        wlx_homework_comment.addStringProperty("content");
        wlx_homework_comment.addIntProperty("is_teacher");
        wlx_homework_comment.addStringProperty("extend_info");
        wlx_homework_comment.addStringProperty("comment_content_code");
        wlx_homework_comment.addLongProperty("creation_date");
        wlx_homework_comment.addLongProperty("last_modified_date").notNull();
    }

    private static void wlx_homework_statistics(Schema schema) {
        Entity wlx_homework_statistics = schema.addEntity("wlx_homework_statistics");
        wlx_homework_statistics.addStringProperty("homework_statistics_id").primaryKey().notNull();
        wlx_homework_statistics.addIntProperty("grade_id").notNull();
        wlx_homework_statistics.addIntProperty("homework_count");
        wlx_homework_statistics.addIntProperty("teacher_comment_count");
        wlx_homework_statistics.addIntProperty("family_comment_count");
        wlx_homework_statistics.addLongProperty("last_modified_date");
    }

    private static void wlx_message(Schema schema) {
        Entity wlx_message = schema.addEntity("wlx_message");
        wlx_message.addStringProperty("message_id").primaryKey().notNull();
        wlx_message.addIntProperty("sender_user_id");
        wlx_message.addIntProperty("receiver_user_id");
        wlx_message.addStringProperty("title");
        wlx_message.addStringProperty("content");
        wlx_message.addIntProperty("group_id");
        wlx_message.addIntProperty("is_read");
        wlx_message.addStringProperty("category_code");
        wlx_message.addStringProperty("category_name");
        wlx_message.addStringProperty("message_code");
        wlx_message.addStringProperty("message_name");
        wlx_message.addStringProperty("status_code");
        wlx_message.addStringProperty("extend_info");
        wlx_message.addLongProperty("expires_date");
        wlx_message.addLongProperty("creation_date");
        wlx_message.addLongProperty("last_modified_date");
    }

    private static void wlx_org_classroom(Schema schema) {
        Entity wlx_org_classroom = schema.addEntity("wlx_org_classroom");
        wlx_org_classroom.addStringProperty("classroom_id").primaryKey().notNull();
        wlx_org_classroom.addIntProperty("space_id");
        wlx_org_classroom.addIntProperty("org_user_id");
        wlx_org_classroom.addStringProperty("title");
        wlx_org_classroom.addStringProperty("summary");
        wlx_org_classroom.addIntProperty("max_student_count");
        wlx_org_classroom.addStringProperty("class_type_code_group");
        wlx_org_classroom.addLongProperty("last_modified_date");
    }

    private static void wlx_org_space(Schema schema) {
        Entity wlx_org_space = schema.addEntity("wlx_org_space");
        wlx_org_space.addStringProperty("space_id").primaryKey().notNull();
        wlx_org_space.addIntProperty("org_user_id");
        wlx_org_space.addStringProperty("title");
        wlx_org_space.addStringProperty("summary");
        wlx_org_space.addIntProperty("student_count");
        wlx_org_space.addIntProperty("max_student_count");
        wlx_org_space.addStringProperty("contact");
        wlx_org_space.addStringProperty("telphone");
        wlx_org_space.addIntProperty("opening_time");
        wlx_org_space.addIntProperty("closing_time");
        wlx_org_space.addStringProperty("space_type_code");
        wlx_org_space.addLongProperty("last_modified_date");
    }

    private static void wlx_schedule(Schema schema) {
        Entity wlx_schedule = schema.addEntity("wlx_schedule");
        wlx_schedule.addStringProperty("schedule_id").primaryKey().notNull();
        wlx_schedule.addIntProperty("teacher_user_id");
        wlx_schedule.addIntProperty("org_user_id");
        wlx_schedule.addIntProperty("addition_id");
        wlx_schedule.addStringProperty("addition_student_ids");
        wlx_schedule.addIntProperty("space_id");
        wlx_schedule.addIntProperty("classroom_id");
        wlx_schedule.addIntProperty("grade_id");
        wlx_schedule.addStringProperty("grade_title");
        wlx_schedule.addIntProperty("score_well");
        wlx_schedule.addIntProperty("score_good");
        wlx_schedule.addIntProperty("score_bad");
        wlx_schedule.addStringProperty("prepare_content");
        wlx_schedule.addStringProperty("remark");
        wlx_schedule.addStringProperty("class_type_code");
        wlx_schedule.addStringProperty("class_child_type_code");
        wlx_schedule.addStringProperty("grade_type_code");
        wlx_schedule.addIntProperty("is_study");
        wlx_schedule.addIntProperty("is_homework");
        wlx_schedule.addIntProperty("is_addition");
        wlx_schedule.addIntProperty("is_finished");
        wlx_schedule.addStringProperty("extend_info");
        wlx_schedule.addLongProperty("opening_date");
        wlx_schedule.addLongProperty("closing_date");
        wlx_schedule.addLongProperty("schedule_date");
        wlx_schedule.addLongProperty("last_modified_date");
    }

    private static void wlx_schedule_addition(Schema schema) {
        Entity wlx_schedule_addition = schema.addEntity("wlx_schedule_addition");
        wlx_schedule_addition.addStringProperty("addition_id").primaryKey().notNull();
        wlx_schedule_addition.addIntProperty("user_id");
        wlx_schedule_addition.addIntProperty("grade_id");
        wlx_schedule_addition.addIntProperty("week");
        wlx_schedule_addition.addIntProperty("schedule_count");
        wlx_schedule_addition.addStringProperty("remark");
        wlx_schedule_addition.addIntProperty("is_teacher");
        wlx_schedule_addition.addStringProperty("extend_info");
        wlx_schedule_addition.addStringProperty("start_time");
        wlx_schedule_addition.addStringProperty("end_time");
        wlx_schedule_addition.addLongProperty("start_date");
        wlx_schedule_addition.addLongProperty("end_date");
        wlx_schedule_addition.addLongProperty("last_modified_date");
        wlx_schedule_addition.addLongProperty("creation_date");
    }

    public static void wlx_schedule_change(Schema schema) {
        Entity wlx_schedule_change = schema.addEntity("wlx_schedule_change");
        wlx_schedule_change.addStringProperty("schedule_change_id").primaryKey().notNull();
        wlx_schedule_change.addIntProperty("user_id");
        wlx_schedule_change.addIntProperty("grade_id");
        wlx_schedule_change.addStringProperty("schedule_ids");
        wlx_schedule_change.addIntProperty("is_teacher");
        wlx_schedule_change.addStringProperty("reason_code");
        wlx_schedule_change.addStringProperty("type_code");
        wlx_schedule_change.addStringProperty("remark");
        wlx_schedule_change.addStringProperty("extend_info");
        wlx_schedule_change.addLongProperty("start_date");
        wlx_schedule_change.addLongProperty("end_date");
        wlx_schedule_change.addLongProperty("new_start_date");
        wlx_schedule_change.addLongProperty("new_end_date");
        wlx_schedule_change.addLongProperty("last_modified_date");
    }

    public static void wlx_statistics_student_class(Schema schema) {
        Entity wlx_statistics_student_class = schema.addEntity("wlx_statistics_student_class");
        wlx_statistics_student_class.addStringProperty("statistics_id").primaryKey().notNull();
        wlx_statistics_student_class.addIntProperty("student_id");
        wlx_statistics_student_class.addIntProperty("grade_id");
        wlx_statistics_student_class.addIntProperty("work_count");
        wlx_statistics_student_class.addIntProperty("unwork_count");
        wlx_statistics_student_class.addIntProperty("homework_count");
        wlx_statistics_student_class.addIntProperty("month");
        wlx_statistics_student_class.addIntProperty("year");
        wlx_statistics_student_class.addLongProperty("last_modified_date");
    }

    public static void wlx_statistics_teacher_schedule_day(Schema schema) {
        Entity wlx_statistics_teacher_schedule_day = schema.addEntity
                ("wlx_statistics_teacher_schedule_day");
        wlx_statistics_teacher_schedule_day.addStringProperty("statistics_id").primaryKey()
                .notNull();
        wlx_statistics_teacher_schedule_day.addIntProperty("teacher_user_id");
        wlx_statistics_teacher_schedule_day.addIntProperty("grade_id");
        wlx_statistics_teacher_schedule_day.addIntProperty("work_count");
        wlx_statistics_teacher_schedule_day.addIntProperty("addition_count");
        wlx_statistics_teacher_schedule_day.addIntProperty("schedule_count");
        wlx_statistics_teacher_schedule_day.addIntProperty("day");
        wlx_statistics_teacher_schedule_day.addIntProperty("month");
        wlx_statistics_teacher_schedule_day.addIntProperty("year");
        wlx_statistics_teacher_schedule_day.addLongProperty("last_modified_date");
    }

    public static void wlx_statistics_teacher_schedule_month(Schema schema) {
        Entity wlx_statistics_teacher_schedule_month = schema.addEntity
                ("wlx_statistics_teacher_schedule_month");
        wlx_statistics_teacher_schedule_month.addStringProperty("statistics_id").primaryKey()
                .notNull();
        wlx_statistics_teacher_schedule_month.addIntProperty("teacher_user_id");
        wlx_statistics_teacher_schedule_month.addIntProperty("grade_id");
        wlx_statistics_teacher_schedule_month.addIntProperty("work_count");
        wlx_statistics_teacher_schedule_month.addIntProperty("addition_count");
        wlx_statistics_teacher_schedule_month.addIntProperty("schedule_count");
        wlx_statistics_teacher_schedule_month.addIntProperty("month");
        wlx_statistics_teacher_schedule_month.addIntProperty("year");
        wlx_statistics_teacher_schedule_month.addLongProperty("last_modified_date");
    }

    public static void wlx_student(Schema schema) {
        Entity wlx_student = schema.addEntity("wlx_student");
        wlx_student.addStringProperty("student_id").primaryKey().notNull();
        wlx_student.addIntProperty("family_user_id");
        wlx_student.addStringProperty("realname");
        wlx_student.addStringProperty("realname_pinyin");
        wlx_student.addLongProperty("birthday");
        wlx_student.addStringProperty("mobile");
        wlx_student.addStringProperty("avatar_url");
        wlx_student.addStringProperty("remark");
        wlx_student.addStringProperty("sex_code");
        wlx_student.addLongProperty("last_modified_date");
    }

    public static void wlx_student_level(Schema schema) {
        Entity wlx_student_level = schema.addEntity("wlx_student_level");
        wlx_student_level.addStringProperty("student_level_id").primaryKey().notNull();
        wlx_student_level.addIntProperty("student_id");
        wlx_student_level.addIntProperty("level");
        wlx_student_level.addIntProperty("score");
        wlx_student_level.addStringProperty("class_type_code");
        wlx_student_level.addStringProperty("extend_info");
        wlx_student_level.addLongProperty("last_modified_date");
    }

    public static void wlx_student_medal(Schema schema) {
        Entity wlx_student_medal = schema.addEntity("wlx_student_medal");
        wlx_student_medal.addStringProperty("student_medal_id").primaryKey().notNull();
        wlx_student_medal.addIntProperty("student_id").notNull();
        wlx_student_medal.addIntProperty("score");
        wlx_student_medal.addIntProperty("next_score");
        wlx_student_medal.addStringProperty("medal_level_code");
        wlx_student_medal.addStringProperty("medal_code");
        wlx_student_medal.addStringProperty("class_type_code");
        wlx_student_medal.addStringProperty("extend_info");
        wlx_student_medal.addLongProperty("last_modified_date");
    }

    public static void wlx_student_order_detail(Schema schema) {
        Entity wlx_student_order_detail = schema.addEntity("wlx_student_order_detail");
        wlx_student_order_detail.addStringProperty("student_order_detail_id").primaryKey()
                .notNull();
        wlx_student_order_detail.addIntProperty("student_id");
        wlx_student_order_detail.addIntProperty("teacher_user_id");
        wlx_student_order_detail.addIntProperty("family_user_id");
        wlx_student_order_detail.addIntProperty("org_user_id");
        wlx_student_order_detail.addIntProperty("space_id");
        wlx_student_order_detail.addIntProperty("classroom_id");
        wlx_student_order_detail.addIntProperty("grade_id");
        wlx_student_order_detail.addStringProperty("grade_title");
        wlx_student_order_detail.addIntProperty("medal_count");
        wlx_student_order_detail.addIntProperty("homework_count");
        wlx_student_order_detail.addStringProperty("grade_type_code");
        wlx_student_order_detail.addStringProperty("grade_type_name");
        wlx_student_order_detail.addStringProperty("class_type_code");
        wlx_student_order_detail.addStringProperty("class_type_name");
        wlx_student_order_detail.addStringProperty("class_child_type_code");
        wlx_student_order_detail.addStringProperty("class_child_type_name");
        wlx_student_order_detail.addIntProperty("consume_number");
        wlx_student_order_detail.addIntProperty("balance_number");
        wlx_student_order_detail.addIntProperty("total_number");
        wlx_student_order_detail.addLongProperty("last_modified_date");
    }

    public static void wlx_student_study(Schema schema) {
        Entity wlx_student_study = schema.addEntity("wlx_student_study");
        wlx_student_study.addStringProperty("student_study_id").primaryKey().notNull();
        wlx_student_study.addIntProperty("student_id");
        wlx_student_study.addIntProperty("teacher_user_id");
        wlx_student_study.addIntProperty("grade_id");
        wlx_student_study.addIntProperty("schedule_id");
        wlx_student_study.addStringProperty("student_remark");
        wlx_student_study.addStringProperty("teacher_remark");
        wlx_student_study.addStringProperty("study_status_code");
        wlx_student_study.addStringProperty("extend_info");
        wlx_student_study.addLongProperty("start_date");
        wlx_student_study.addLongProperty("end_date");
        wlx_student_study.addLongProperty("last_modified_date");
        wlx_student_study.addIntProperty("version");
    }

    public static void wlx_user_friend(Schema schema) {
        Entity wlx_test = schema.addEntity("wlx_user_friend");
        wlx_test.addStringProperty("family_user_id").primaryKey();
        wlx_test.addIntProperty("friend_user_id");
        wlx_test.addStringProperty("friend_mobile");
        wlx_test.addStringProperty("relation_name");
        wlx_test.addIntProperty("is_authorized");
        wlx_test.addStringProperty("invite_status_code");
        wlx_test.addLongProperty("last_modified_date");
    }

    private static void wlx_schedule_score(Schema schema) {
        Entity wlx_schedule = schema.addEntity("wlx_schedule_score");
        wlx_schedule.addStringProperty("schedule_score_id").primaryKey().notNull();
        wlx_schedule.addIntProperty("user_id");
        wlx_schedule.addIntProperty("family_user_id");
        wlx_schedule.addIntProperty("schedule_id");
        wlx_schedule.addIntProperty("grade_id");
        wlx_schedule.addStringProperty("content");
        wlx_schedule.addStringProperty("schedule_score_code");
        wlx_schedule.addStringProperty("extend_info");
        wlx_schedule.addLongProperty("creation_date");
    }
}
